<style type="text/css">
    .layui-form-select dl{z-index:9999;}
</style>
<form class="layui-form" action="{:url()}" method="post" id="editForm">
    <div class="layui-form-item">
        <label class="layui-form-label">配料名称</label>
        <div class="layui-input-inline w200">
            <select name="product_id" class="field-product_id" type="select" lay-verify="required">
                <option value="">请选择</option>
                {$products|raw}

            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">数量</label>
        <div class="layui-input-inline w200">
            <input type="number"  class="layui-input field-product_num" name="product_num" value="1" lay-verify="number">
        </div>

    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否分解使用</label>
        <div class="layui-input-inline w200">
            <input type="radio" class="field-is_volume" name="is_volume" value="1" title="是" checked>
            <input type="radio" class="field-is_volume" name="is_volume" value="2" title="否">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <input type="hidden" class="field-product_id_old" name="product_id_old">
            <input type="hidden" class="field-project_id" name="project_id">
            <input type="hidden" class="field-sub_id" name="sub_id">
            <input type="hidden" class="field-project_num" name="project_num">
            <input type="hidden" class="field-project_name" name="project_name">
            <button type="submit" class="layui-btn layui-btn-normal" hisi-data="{pop: true, refresh: true}" lay-submit="" lay-filter="formSubmit">提交</button>
            <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
        </div>
    </div>
</form>
{include file="system@block/layui" /}
<script>
layui.use(['func','jquery','form'], function() {
    var $ = layui.jquery
        ,form = layui.form;
    // 编辑模式下表单自动赋值
    layui.func.assign({:json_encode($formData)});

});
</script>
